<template>
	
	<view class="my-search-container" :style="{'background-color':bgcolor}" @click="clickBoxHandler">
			<view class="my-search-box" :style="{'border-radius':radius+'px'}">
				<uni-icons type="search" size="18"></uni-icons>
				<text class="placeholder">搜索</text>
			</view>	
	</view>
	
</template>

<script>
	export default {
		name:"my-search",
		props:{
			 bgcolor:{
				 type:String,
				 default:'#FF0000'
			 },
			 radius:{
				 type:Number,
				 default:18
			 }
		},
		methods:{
			clickBoxHandler(){
				this.$emit('click')
				console.log(1);
			}
		}
	}
</script>

<style lang="scss">
	.my-search-container{
		height: 50px;
		padding: 0 20px;
		display: flex;
		align-items: center;
		.my-search-box{
			
			background-color: white;
			height: 36px;
			display: flex;
			align-items: center;
			justify-content: center;
			width: 100%;
			
			.placeholder{
				font-size: 15px;
			}
		}
	}
</style>